<?php 
/**
 * notice api
 *
 * @author: prettyyjnic <prettyyjnic@qq.com> 2015-12-28
 */
class Api_Demo extends PhalApi_Api {

	public function getRules() {
        return array(
            'getUser' => array(
                'user_id' => array('name' => 'user_id', 'default' => 1, 'type'=>'int'),
            ),
        );
	}
	
	/**
	 * Demo接口服务
	 * @return string user_id 用户id
	 * @return string email 用户email
	 * @return string username 用户名
	 */
	public function getUser() {
		DI()->logger->info('error');
		$mod = new Model_Index();
		$ret = $mod->getOne($this->user_id);
        return $ret;
	}
}